package com.example.java_chatroom.model;

// 表示一个消息请求
public class MessageRequest {
    private String type = "message";
    private int sessionId;
    private String content;
    private User user;
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getSessionId() {
        return sessionId;
    }

    public void setSessionId(int sessionId) {
        this.sessionId = sessionId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "MessageRequest{" +
                "type='" + type + '\'' +
                ", sessionId=" + sessionId +
                ", content='" + content + '\'' +
                ", user=" + user +
                '}';
    }
}
